/*
 * @Author: hmhvictory 1400628624@qq.com
 * @Date: 2025-07-23 20:08:08
 * @LastEditors: hmhvictory 1400628624@qq.com
 * @LastEditTime: 2025-07-23 20:08:21
 * @FilePath: \实训笔记\day08\RandomNumbers.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package day08;

import java.util.Arrays;

public class RandomNumbers {
    public static void main(String[] args) {
        // 定义一个长度为 10 的数组
        int[] numbers = new int[10];

        for (int i = 0; i < numbers.length; i++) {
            // 生成范围在 [1, 100] 的随机整数
            numbers[i] = (int) (Math.random() * 100) + 1;
        }

        // 打印数组内容
        System.out.println("生成的随机数数组：");
        System.out.println(Arrays.toString(numbers));
    }
}